package darknet.application.chat.impl.net.response;

import darknet.core.spec.net.Node;
import darknet.core.spec.net.Response;
import java.util.Set;

/**
 * A response sent by a channel hoster when another node join the channel.
 *
 * @author Yoyo
 */
public class JoinChannelResponse implements Response {

    /** List of channels. */
    private Set<Node> connectedNodes;

    /**
     * Initialise a new ListChannel Response.
     *
     * @param channelsName The list of all channels.
     */
    public JoinChannelResponse(Set<Node> connectedNodes) {

        if (connectedNodes == null) {
            throw new IllegalArgumentException("connectedNodes is null");
        }
        this.connectedNodes = connectedNodes;
    }

    public Set<Node> getConnectedNodes() {
        return connectedNodes;
    }
}
